package com.heimali.happyreader.utils;

import java.util.List;

import com.heimali.happyreader.model.Intro;

public class LogicUtils {
	
	public static int getListMinID(List<Intro> list, int minID) {
		for(Intro item : list) {
			if (minID < 0) {
				minID = item.id;
			}else if(minID > item.id){
				minID = item.id;
			}
		}
		return minID;
	}
	
	public static int getListMaxID(List<Intro> list, int maxID) {
		for(Intro item : list) {
			if (maxID <=0) {
				maxID = item.id;
			}else if(maxID < item.id){
				maxID = item.id;
			}
		}
		return maxID;
	}
	
}
